import axiosInstance from './axiosInstance';

/**
 * Dashboard相关API
 */
export const dashboardApi = {
  /**
   * 获取首页统计数据
   * @returns {Promise} - 返回统计数据
   */
  getDashboardStats: () => axiosInstance.get('/dashboard/stats'),

  /**
   * 获取部门成本分布数据
   * @returns {Promise} - 返回部门成本分布数据
   */
  getDepartmentCostDistribution: () => axiosInstance.get('/dashboard/department-cost'),

  /**
   * 获取成本项目分析数据
   * @returns {Promise} - 返回成本项目分析数据
   */
  getCostItemAnalysis: () => axiosInstance.get('/dashboard/cost-item-analysis'),

  /**
   * 获取成本趋势分析数据
   * @returns {Promise} - 返回成本趋势分析数据
   */
  getCostTrendAnalysis: () => axiosInstance.get('/dashboard/cost-trend'),
  
  /**
   * 获取月度支出对比数据
   * @returns {Promise} - 返回月度支出对比数据
   */
  getMonthlyExpenseComparison: () => axiosInstance.get('/dashboard/monthly-expense-comparison')
};

export default dashboardApi;